package com.teamin.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.util.Date;

/**
 * 任务评论实体类
 */
@ApiModel(value = "评论的实体类222",description = "评论的实体类")
public class CommentEntity implements Serializable{

    public static int COMMENT_TYPE_TEXT = 0 ;
    public static int COMMENT_TYPE_IMG = 2 ;

    @ApiModelProperty(value = "评论 ID")
    private Long commentId;

    @ApiModelProperty(value = "评论的时间")
    private Date createTime;

    @ApiModelProperty(value = "评论的类型  评论的类型 1 为文本信息,2表图片(必)")
    private int contentType;

    @ApiModelProperty(value = "评论的内容")
    @Length(min = 1,max = 1000, message = "昵称的长度不能大于1000")
    private String content;

    @ApiModelProperty(value = "评论者的ID",hidden = true)
    private Long userId;

    @ApiModelProperty(value = "评论者的名称")
    private String userName;

    @ApiModelProperty(value = "评论者的头像")
    private String headIcon;

    @ApiModelProperty(value = "文件名")
    private String fileName;

    @ApiModelProperty(value = "文件的地址")
    private String fileUrl;

    @ApiModelProperty(value = "缩略图地址")
    private String thumbnailUrl;

    @ApiModelProperty(value = "任务ID")
    private Long taskId;

    @ApiModelProperty(value = "文件的UUID")
    private String uuid;

    public String getUuid() {
        return uuid;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    private String suffix; //后缀

    public String getFileUrl() {
        return fileUrl;
    }

    public String getThumbnailUrl() {
        return thumbnailUrl;
    }

    public String getSuffix() {
        return suffix;
    }

    public Long getCommentId() {
        return commentId;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public void setThumbnailUrl(String thumbnailUrl) {
        this.thumbnailUrl = thumbnailUrl;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public int getContentType() {
        return contentType;
    }

    public String getContent() {
        return content;
    }

    public Long getUserId() {
        return userId;
    }

    public String getUserName() {
        return userName;
    }

    public String getHeadIcon() {
        return headIcon;
    }

    public void setCommentId(Long commentId) {
        this.commentId = commentId;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setContentType(int contentType) {
        this.contentType = contentType;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setHeadIcon(String headIcon) {
        this.headIcon = headIcon;
    }

    @Override
    public String toString() {
        return "CommentEntity{" +
                "commentId=" + commentId +
                ", createTime=" + createTime +
                ", contentType=" + contentType +
                ", content='" + content + '\'' +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", headIcon='" + headIcon + '\'' +
                '}';
    }
}
